
SET( LUA_Unity_H
			config.h
			luaUnity.h
			)
SET( LUA_Unity_SRC ./src/luaUnity.cpp
						global.cpp
						./src/luaUnity.cpp
)


INCLUDE_DIRECTORIES(  ${LUAEx_SOURCE_DIR} )
##INCLUDE_DIRECTORIES(  ${TOLUA++_INCLUDE_DIR} )
INCLUDE_DIRECTORIES(  ${LUA_INCLUDE_DIR} )
INCLUDE_DIRECTORIES(  ${MYLIB_DIR} )
INCLUDE_DIRECTORIES(  ${SOL2_INCLUDE_DIR} )

INCLUDE_DIRECTORIES(  ${Boost_INCLUDE_DIR} )
message( STATUS "PARSERS boost:${Boost_INCLUDE_DIR}")
INCLUDE_DIRECTORIES(  ${MYLIB_LOG_INCLUDE_DIR} )

set(LUA_Unity_ALLFILES ${LUA_Unity_H} ${LUA_Unity_SRC})
add_compile_options(-liconv)

if(LUA_Unity_STATIC_LIB)
	ADD_LIBRARY(luaUnity STATIC ${LUA_Unity_ALLFILES})
else(LUA_Unity_STATIC_LIB)
	ADD_LIBRARY(luaUnity SHARED ${LUA_Unity_ALLFILES})
    if(WIN32)
        add_definitions( -DLUA_Unity_DLL )
    endif(WIN32)
endif(LUA_Unity_STATIC_LIB)

add_dependencies(luaUnity luaState)

add_definitions(-DUNICODE -D_UNICODE)

target_link_libraries(luaUnity ${luaState_LIBRARY})


target_link_libraries(luaUnity ${LUA_LIBRARY} )
target_link_libraries(luaUnity ${Boost_FILESYSTEM_LIBRARY}
							   ${Boost_SYSTEM_LIBRARY} 		
    						   ${Boost_REGEX_LIBRARY}
    						   ${Boost_LOCALE_LIBRARY}
    						)
target_link_libraries(luaUnity ${MYLIB_LOG_LIBRARY}  ${EXTERNAL_LIBRARIES})


SET_TARGET_PROPERTIES(luaUnity PROPERTIES PREFIX "")
collect_library(luaUnity)
